package com.aisun.flinkservice.tomessage;

import org.apache.flink.api.common.functions.MapFunction;
import org.apache.flink.api.java.tuple.Tuple2;

import java.util.Date;

/**
 * @Author: LiuYuanQi
 * @Date: 2020/5/6 16:49
 * 对传进来的消息进行加工处理
 */
public class MessageTransform implements MapFunction<String, Tuple2<String, Long>> {

    @Override
    public Tuple2<String, Long> map(String value) throws Exception {
        return new Tuple2<>(value, new Date().getTime());
    }

}
